<h1>Album: <%= @video_ablum.name %></h1>
<div align = "right"></div>
<% if !@videos.blank? %>
	<table border=1 class="list_table_2">
		<tr>			
			<th>Title</th>
			<th>Position</th>
			<th colspan = "2">Action</th>
		</tr>
		<% @videos.each_with_index do | video,index | %>
			<tr>
				<td><%= video.title %></td>
				<td>
				  <%= link_to image_tag("upside_arrow.jpg",:width => '18px'),:action=>"change_position",:id=>video.id,:change_id=>@videos[index.to_i - 1].id if index.to_i != 0 %>&nbsp;<%= link_to image_tag("downside_arrow.jpg",:width => '18px'),:action=>"change_position",:id=>video.id,:change_id=> @videos[index.to_i + 1].id if !@videos[index.to_i + 1].blank?%>
                </td>
				<td><%= link_to image_tag("Text-Edit-Icon.png", :alt=>"Edit",:border=>"0",  :title=>"Edit"), edit_video_path(video) %></td>
				<td><%= link_to image_tag("notebook_delete.png", :alt=>"Delete",:border=>"0",  :title=>"Delete"), video, :confirm => 'Are you sure?', :method => :delete %></td>
			</tr>
		<% end %>
	</table>
<% end %>
<%= link_to "Back", video_albums_path %>

